Supplemental file s2
In this Rmarkdown we provide the following workflow:
Objective 0. To investigate general literature characteristics such as time trends
Objective 1. To investigate the types of pesticides and pesticide classes, both in terms of the chemical structure and target organism, that have been used in studies examining the effects of pesticide exposure on post-larval zebrafish behaviour
Objective 2. To characterise the study set ups (e.g., characteristics of zebrafish such as life stage of exposure and sex, and characteristics of pesticides such as concentrations and duration of exposure) have been employed to assess the effects of pesticide exposure on the behaviour of post-larval zebrafish.
Objective 3. To identify the extent the specific behaviours have been investigated in pesticide exposure studies that use post-larval zebrafish as a model.
Objective 4. To assess the research contributions of different countries and continents and describe the level of collaboration between authors amongst different countries.
Load packages and Data
Load packages
pacman::p_load(tidyverse,
here,
stringr,
knitr,
formatR,
forcats,
ggplot2,
hrbrthemes, # for ggplot2
patchwork,
plotly, # for ggplot2
bibliometrix,
igraph,
tidyr,
circlize,
cowplot,
mapproj)Load data
All extracted data is stored in five separate .csv files representing different aspects of the data (extracted via structured predefined Google Forms - one per table).
Bibliographic data records are exported from Scopus (including cited references field) in .bib format and locally saved as scopus.bib.
# Load data set containing background information on each study
bib <- read_csv(here("data", "zf_sm_bibliometrics.csv"), skip = 0) # 83 rows 9 columns
# Load data set containing information on the design of each study
sd <- read_csv(here("data","zf_sm_study_details.csv"), skip = 0) # 83 rows 10 columns
# Load data set containing details of each pesticide used in each exposure studies
pd <- read_csv(here("data", "zf_sm_pesticide_details.csv"), skip = 0) # 83 rows 9 columns
# Load data set containing details of dosage and duration of pesticide exposure
pdo <-read_csv(here("data","zf_sm_pesticide_dosage.csv"), skip = 0) # 108 rows 12 columns
# Load data set containing details of behaviorus measured in response to pesticide exposure
bd <- read_csv(here("data", "zf_sm_behaviour_details.csv"), skip = 0) # 83 rows 13 columns
# Load bibliometric information extracted from scopus
bib_sco <- convert2df(here("data","scopus.bib"), dbsource = "scopus", format = "bibtex") # 79 rows 38 columns ##
## Converting your scopus collection into a bibliographic dataframe
##
## Done!
##
##
## Generating affiliation field tag AU_UN from C1: Done!
Objective 0. To investigate general literature characteristics such as time trends
Figure 1a - Current time trends of articles investigating the impacts of pesticide exposure on zebrafish behaviour
# Count the number of articles by year
fig1 <- bib %>%
count(publication_year) %>%
# Create a bar chart with publication year on x-axis and count on y-axis
ggplot(aes(x = publication_year, y = n)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars
geom_text(aes(label = n), position = position_stack(vjust = 0.5), fontface = "bold", color = "white", size = 5, hjust = 0.5) +
# Customize the appearance of the plot
theme_minimal() +
labs(x = "Year", y = "Article Count") +
theme(legend.position = "none",
axis.title.x = element_text(size = 15, face = "bold"),
axis.title.y = element_text(size = 15, face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1, size = 15),
axis.text.y = element_text(size = 15),
panel.grid.major.y = element_line(color = "gray"),
panel.grid.minor.y = element_blank(),
plot.title = element_text(size = 16, face = "bold"))
fig1# ggsave(here("figures", "fig1_time_trends.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig1_time_trends.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Objective 1. To investigate the types of pesticides and pesticide classes, both in terms of chemical and target, that have been used in experiments examining the effects of pesticide exposure on zebrafish behaviour.
Figure 3a - Percentages and counts of included papers on the effects of pesticides on zebrafish behaviour (raw count is provided within each bar) according to individual pesticides (“other” is a total for all pesticides with a publication count less than or equal to two)
# Separate rows with multiple pesticides, count their occurrence, and combined all pesticide that occured once as "other"
total_pesticide_count <- pd %>%
separate_rows(pesticide_investigated, sep = ", ") %>%
count(pesticide_investigated) %>%
mutate(pesticide_investigated = ifelse(n<= 2, "other", as.character(pesticide_investigated))) %>%
# "other" includes triamefon, pyriproxyfen, imidacloprid, fipronil, dieldrin, diazinon, DDT, cypermethrin, tribotyltin, terbutylazine, sodium fluride, pyrimethonil, pyraclostrobin, propiconazole, prochloraz, parathion, paclobutazol, monocotophos, methylbenzoate, methylbenzoate, methomyl, mecroprop, linuron, endosulfan, diuron, difenoconazole, dicamba, cyprodinil, chlorothalonil, carbofuran, carbaryl, broflanilide and boscalid.
group_by(pesticide_investigated) %>%
summarise(n = sum(n))
# Calculate pesticide count as a percentage
pesticide_pct <- total_pesticide_count %>%
mutate(proportion = n/sum(total_pesticide_count$n),
percentage = proportion*100)
# Create a bar chart with the count of pesticides on the x-axis and pesticides on the y-axis
fig3a <- ggplot(pesticide_pct, aes(x = reorder(pesticide_investigated, n), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars for absolute count
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", fontface = "bold", size = 7) +
# Add labels to the bars for percentage
geom_text(data = pesticide_pct, aes(label = paste0(round(percentage,1), "%")),
position = position_dodge(width = 0.9), hjust = -0.1, size = 7, color = "black", fontface = "bold") +
# Customize the appearance of the plot
labs(x = "Pesticide", y = "Percentage") +
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.title.x = element_text(size = 25),
axis.title.y = element_text(size = 25),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 25),
axis.title = element_text(size = 25),
plot.title = element_blank()) +
coord_flip() +
ylim(0,50)
fig3a # ggsave(here("figures", "fig3a_pesticide_count.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig3a_pesticide_count.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure 3b – Percentages and counts of included papers on the effects of pesticides on zebrafish behaviour (raw count is provided within each bar) according to target classes of pesticides
# Separate rows with multiple pesticides and count their occurrence
total_target_class_count <- pd %>%
separate_rows(pesticide_target_class, sep = ",\\s*") %>%
count(pesticide_target_class)
# Calculate target class count as a percentage
target_class_pct <- total_target_class_count %>%
mutate(proportion = n/sum(total_target_class_count$n),
percentage = proportion*100)
# Create a bar chart with the count of target classes on the x-axis and pesticides target class on the y-axis
fig3b <- ggplot(target_class_pct, aes(reorder(pesticide_target_class, n), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars for absolute count
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", fontface = "bold", size = 7) +
# Add labels to the bars for percentage
geom_text(data = target_class_pct, aes(label = paste0(round(percentage, 1), "%")),
position = position_dodge(width = 0.9), hjust = -0.2, size = 7, color = "black", fontface = "bold") +
# Customize the appearance of the plot
labs(x = "Pesticide Target Class", y = "Percentage") +
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 80)
fig3b # ggsave(here("figures", "fig3b_pesticide_target_count.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig3b_pesticide_target_count.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure 3c – Percentages and counts of included papers on the effects of pesticides on zebrafish behaviour (raw count is provided within each bar) according to chemical classes of pesticides (“other” is all pesticide chemical classes with publication count less than or equal to two).
# Separate rows with multiple pesticides and count their occurrence, then filter for cases with more than one occurrence
total_chemical_class_count <- pd %>%
separate_rows(pesticide_chemical_class, sep = ",\\s*") %>%
count(pesticide_chemical_class) %>%
mutate(pesticide_chemical_class = ifelse(n<= 2, "other", as.character(pesticide_chemical_class))) %>%
# "other" includes pyridine, phenylurea, neonicitinoid, monochlorobenzens, aminopyrimidine, viologen, trialkyltins, strobilurin, organohalogen, imidazole, inorganic ionic compound, auxin,
group_by(pesticide_chemical_class) %>%
summarise(n = sum(n))
# Calculate target class count as a percentage
chemical_class_pct <- total_chemical_class_count %>%
mutate(proportion = n/sum(total_chemical_class_count$n),
percentage = proportion*100)
# Create a bar chart with the count of chemical classes on the x-axis and pesticides chemical class on the y-axis
fig3c <- ggplot(chemical_class_pct, aes(x = reorder(pesticide_chemical_class,n), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", fontface = "bold", size = 7) +
# Add labels to the bars for percentage
geom_text(data = chemical_class_pct, aes(label = paste0(round(percentage,1), "%")),
position = position_dodge(width = 0.9), hjust = -0.2, size = 7, color = "black", fontface = "bold") +
# Customize the appearance of the plot
labs(x = "Pesticide Chemical Class", y = "Percentage") +
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 40)
fig3c # ggsave(here("figures", "fig3c_pesticide_chemical_count.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig3c_pesticide_chemical_count.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure 3 - Percentages and counts of included papers on the effects of pesticides on zebrafish behaviour (raw count is provided within each bar) according to: a) individual pesticides (“other” is a total for all pesticides with a publication count less than or equal to two), b) target classes of pesticides, and c) chemical classes of pesticides (“other” is all pesticide chemical classes with publication count less than or equal to two).
# Combine three plots into a single plot using a grid layout
fig3 <- ((fig3a) | (fig3b / fig3c) + plot_annotation(tag_levels = "A"))
fig3# ggsave(here("figures", "fig3_pesticide_count_combined.pdf"), width = 20, height = 12, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig3_pesticide_count_combined.jpg"), width = 20, height = 12, units = "cm", scale = 2, dpi = 800)Objective 2. To investigate pesticide exposure study designs such as concentration and duration of exposure, life stages of zebrafish used in each study and the sample sizes used.
Figure 4a – Percentages and counts of included papers on the effects of pesticides on zebrafish behaviour (raw count is provided within each bar) according to reported sex of zebrafish exposed to pesticides
# Calculate total count for each category
total_sex_count <- sd %>% count(sex)
# Calculate proportion and percentage for each category
sex_pct <- sd %>%
count(sex) %>%
mutate(proportion = n/sum(total_sex_count$n),
percentage = proportion*100)
# Create a bar chart with the count on the x-axis and behaviorual class on the y-axis
fig4a <- ggplot(sex_pct, aes(x = reorder(sex, percentage), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars for percentage
geom_text(aes(label = paste0(round(percentage, 1), "%")), hjust = -0.2, vjust = 0.5, size = 7, fontface = "bold") +
# Add absolute count to bars
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", fontface = "bold", size = 7) +
# Add axis and plot labels
labs(x = "Sex of Exposure", y = "Percentage") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 100)
fig4a # ggsave(here("figures", "fig4a_total_sex_exposed.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig4a_total_sex_exposed.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure 4b - Percentages and counts of included papers on the effects of pesticides on zebrafish behaviour (raw count is provided within each bar) according to zebrafish life stages at pesticide exposure
# Calculate total count for each category
total_count_lse <- sd %>% count(life_stage_exposure)
# Calculate proportion and percentage for each category
life_stage_pct <- sd %>%
separate_rows(life_stage_exposure, sep = ",\\s*") %>%
count(life_stage_exposure) %>%
mutate(proportion = n/sum(total_count_lse$n),
percentage = proportion*100)
# Create a bar chart with the count on the x-axis and life stage of exposure on the y-axis
fig4b <- ggplot(life_stage_pct, aes(x = reorder(life_stage_exposure, percentage), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars for percentage
geom_text(aes(label = paste0(round(percentage, 1), "%")), hjust = -0.2, vjust = 0.5, size = 7, fontface = "bold") +
# Add absolute count to bars
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", fontface = "bold", size = 7) +
# Add axis and plot labels
labs( x = "Life Stage of Exposure", y = "Percentage", fontsize = 14) +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 100)
fig4b # ggsave(here("figures", "fig4b_life_stage_exposure.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig4b_life_stage_exposure.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure 4c – Percentages and counts of included papers on the effects of pesticides on zebrafish behaviour (raw count is provided within each bar) according to zebrafish life stages at behavioural assessment.
# Calculate total count for each category
total_count_lsb <- sd %>% count(life_stage_behaviour)
# Calculate proportion and percentage for each category
life_stage_pct <- sd %>%
separate_rows(life_stage_behaviour, sep = ",\\s*") %>%
count(life_stage_behaviour) %>%
mutate( proportion = n / sum(total_count_lsb$n),
percentage = proportion * 100)
# Create a bar chart with the count on the x-axis and life stage of behavior on the y-axis
fig4c <- ggplot(life_stage_pct, aes(x = reorder(life_stage_behaviour, percentage), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8,position = position_dodge(0.9)) +
# Add labels to the bars for percentage
geom_text(aes(label = paste0(round(percentage, 1), "%")), hjust = -0.2, vjust = 0.5, size = 7, fontface = "bold") +
# Add absolute count to bars
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white",fontface = "bold", size = 7) +
# Add axis and plot labels
labs(x = "Life Stage of Behavior", y = "Percentage", fontsize = 14) +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 100)
fig4c # ggsave(here("figures", "fig4c_life_stage_behaviour.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig4c_life_stage_behaviour.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure 4 – Percentages and counts of included papers on the effects of pesticides on zebrafish behaviour (raw count is provided within each bar) according to: a) reported sex of zebrafish exposed to pesticides, b) zebrafish life stages at pesticide exposure, c) zebrafish life stages at behavioural assessment.
# Combine three plots into a single plot using a grid layout
fig4 <- ((fig4a) / (fig4b) / (fig4c) + plot_annotation(tag_levels = "A"))
fig4 # ggsave(here("figures", "fig4_zebrafish_characteristics.pdf"), width = 15, height = 15, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig4_zebrafish_characteristics.jpg"), width = 15, height = 15, units = "cm", scale = 2, dpi = 800)making dosages consistent for dosage comparisons
pdo <- pdo %>%
# Remove rows with NA values
filter(!is.na(dosage_lowest)) %>%
# Convert dosage_lowest to numeric and dosage_lowest_unit to character
mutate(dosage_lowest = as.numeric(dosage_lowest),
dosage_lowest_unit = as.character(dosage_lowest_unit),
# Standardize dosage_unit_consistent based on dosage_lowest_unit
dosage_unit_consistent = case_when(
dosage_lowest_unit == "mg/L" ~ "ug/L",
dosage_lowest_unit == "ng/L" ~ "ug/L",
dosage_lowest_unit == "g/L" ~ "ug/L",
dosage_lowest_unit == "ppb" ~ "ug/L",
dosage_lowest_unit == "ppm" ~ "ug/L",
TRUE ~ dosage_lowest_unit),
# Convert dosage_lowest to ug/L based on dosage_lowest_unit
dosage_lowest_convert_ugL = case_when(
dosage_lowest_unit == "mg/L" ~ dosage_lowest * 1000,
dosage_lowest_unit == "ng/L" ~ dosage_lowest / 1000,
dosage_lowest_unit == "g/L" ~ dosage_lowest/1000000,
dosage_lowest_unit == "ppb" ~ dosage_lowest * 1000,
dosage_lowest_unit == "ppm" ~ dosage_lowest/1000,
TRUE ~ dosage_lowest),
# Convert dosage_highest to numeric and dosage_highest_unit to character
dosage_highest = as.numeric(dosage_highest),
# Convert dosage_highest to ug/L based on dosage_highest_unit
dosage_highest_convert_ugL = case_when(
dosage_highest_unit == "mg/L" ~ dosage_highest * 1000,
dosage_highest_unit == "ng/L" ~ dosage_highest / 1000,
dosage_highest_unit == "g/L" ~ dosage_highest/1000000,
dosage_highest_unit == "ppb" ~ dosage_highest * 1000,
dosage_highest_unit == "ppm" ~ dosage_highest/1000,
TRUE ~ dosage_highest))Figure 5a - Plot showing the distributions of highest and lowest concentrations of pesticide used in each study
# Pivot the dataset to a longer format, separating out the dosage type (lowest or highest) and value into separate columns
pdo_waterbourne <- pdo %>%
pivot_longer(cols = c(dosage_lowest, dosage_highest),
names_to = "dosage_type",
values_to = "dosage_value") %>%
# Filter for waterborne routes with consistent dosage units and a dosage number greater than 1
filter(route == "waterbourne", dosage_unit_consistent == "ug/L",
dosage_number > 1) %>%
# Rename the dosage type column for better labeling in the plot
mutate(dosage_type = if_else(dosage_type == "dosage_lowest", "Lowest ", "Highest "))
# Create the plot with dosage type (i.e., lowest or highest dose) on the x-axis and dosage value on the y-axis
fig5a <- ggplot(pdo_waterbourne, aes(x = dosage_type, y = log(dosage_value))) +
# Add a violin plot
geom_violin(fill = "#5F85AE", alpha =0.2, color = NA, trim = FALSE) +
# Add a boxplot
geom_boxplot(width = 0.05, fill = "white", color = "#5F85AE", outlier.shape = NA) +
# Add jittered points .
geom_jitter(width = 0.1, height = 0.05, color = "#5F85AE", alpha = 0.8) +
# Add axis and plot labels
labs(title = "Waterborne Exposures by Dosage in ug/L", x = "Waterborne Exposure", y = "log(Dosage) [ug/L]") +
# Customize plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank())
fig5a# ggsave(here("figures", "fig5a_pesticide_dosage.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig5a_pesticide_dosage.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s3 - Distribution of dosages used to expose zebrafish to deltamethrin via the waterborne exposure method
# Pivot the data set to a longer format, separating out the dosage type (lowest or highest) and value into separate columns
pdo_waterbourne_deltamethrin <- pdo %>%
pivot_longer(cols = c(dosage_lowest, dosage_highest),
names_to = "dosage_type",
values_to = "dosage_value") %>%
# Filter for waterborne routes with consistent dosage units and only deltamethrin pesticide investigated
filter(route == "waterbourne", dosage_unit_consistent == "ug/L", pesticide_investigated == "deltamethrin") %>%
# Rename the dosage type column for better labeling in the plot
mutate(dosage_type = if_else(dosage_type == "dosage_lowest", "Lowest Dosage Exposed", "Highest Dosage Exposed"))
# Create the plot with dosage type (i.e., lowest or highest dose) on the x-axis and dosage value on the y-axis
figs3 <- ggplot(pdo_waterbourne_deltamethrin, aes(x = dosage_type, y = log(dosage_value))) +
# Add a violin plot
geom_violin(fill = "#5F85AE", alpha = 0.2, color = NA, trim = FALSE) +
# Add a boxplot
geom_boxplot(width = 0.05, fill = "white", color = "#5F85AE", outlier.shape = NA) +
# Add jittered points
geom_jitter(width = 0.1, height = 0.05, color = "#5F85AE", alpha = 0.5) +
# Add axis and plot labels
labs(title = "Waterborne Exposures of Deltamethrin by Dosage in ug/L", x = "Waterbourne exposure", y = "log(Dosage) [ug/L]") +
# Customize plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank())
figs3 # ggsave(here("figures", "figs3_pesticide_dosage_deltamethrin.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs3_pesticide_dosage_deltamethrin.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s4 - Distribution of dosages used to expose zebrafish to rotenone via the waterborne exposure method
# Pivot the data set to a longer format, separating out the dosage type (lowest or highest) and value into separate columns
pdo_waterbourne_rotenone <- pdo %>%
pivot_longer(cols = c(dosage_lowest, dosage_highest),
names_to = "dosage_type",
values_to = "dosage_value") %>%
# Filter for waterborne routes with consistent dosage units and only rotenone pesticide investigated
filter(route == "waterbourne", dosage_unit_consistent == "ug/L", pesticide_investigated == "rotenone") %>%
# Rename the dosage type column for better labeling in the plot
mutate(dosage_type = if_else(dosage_type == "dosage_lowest", "Lowest Dosage Exposed", "Highest Dosage Exposed"))
# Create the plot with dosage type (i.e., lowest or highest dose) on the x-axis and dosage value on the y-axis
figs4 <- ggplot(pdo_waterbourne_rotenone, aes(x = dosage_type, y = log(dosage_value))) +
# Add a violin plot
geom_violin(fill = "#5F85AE", alpha = 0.3, trim = FALSE, color = NA) +
# Add a boxplot
geom_boxplot(width = 0.05, fill = "white", color = "#5F85AE", outlier.shape = NA) +
# Add jittered points
geom_jitter(width = 0.1, height = 0.05, color = "#5F85AE", alpha = 0.5) +
# Add axis and plot labels
labs(title = "Waterborne Exposures of Rotenone by Dosage in ug/L", x = "Waterbourne exposure", y = "log(Dosage) [ug/L]") +
# Customize plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank())
figs4 # ggsave(here("figures", "figs4_pesticide_dosage_rotenone.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs4_pesticide_dosage_rotenone.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s5 – Distribution of dosages used to expose zebrafish to atrazine via the waterborne exposure method
# Pivot the data set to a longer format, separating out the dosage type (lowest or highest) and value into separate columns
pdo_waterbourne_atrazine <- pdo %>%
pivot_longer(cols = c(dosage_lowest, dosage_highest),
names_to = "dosage_type",
values_to = "dosage_value") %>%
# Filter for waterborne routes with consistent dosage units and only atrazine pesticide investigated
filter(route == "waterbourne", dosage_unit_consistent == "ug/L", pesticide_investigated == "atrazine") %>%
# Rename the dosage type column for better labeling in the plot
mutate(dosage_type = if_else(dosage_type == "dosage_lowest", "Lowest Dosage Exposed", "Highest Dosage Exposed"))
# Create the plot with dosage type (i.e., lowest or highest dose) on the x-axis and dosage value on the y-axis
figs5 <- ggplot(pdo_waterbourne_atrazine, aes(x = dosage_type, y = log(dosage_value))) +
# Add a violin plot
geom_violin(fill = "#5F85AE", alpha = 0.3, trim = FALSE, color = "NA") +
# Add a boxplot
geom_boxplot(width = 0.05, fill = "white", color = "#5F85AE", outlier.shape = NA) +
# Add jittered points
geom_jitter(width = 0.1, height = 0.05, color = "#5F85AE", alpha = 0.5) +
# Add axis and plot labels
labs(title = "Waterborne Exposures of Atrazine by Dosage in ug/L", x = "Waterborne exposure", y = "log(Dosage) [ug/L]") +
# Customize plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank())
figs5 # ggsave(here("figures", "figs5_pesticide_dosage_atrazine.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs5_pesticide_dosage_atrazine.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s6 – Distribution of the dosages used to expose zebrafish to glyphosate via the waterborne exposure method
# Pivot the data set to a longer format, separating out the dosage type (lowest or highest) and value into separate columns
pdo_waterbourne_glyphosate <- pdo %>%
pivot_longer(cols = c(dosage_lowest, dosage_highest),
names_to = "dosage_type",
values_to = "dosage_value") %>%
# Filter for waterborne routes with consistent dosage units and only glyphosate pesticide investigated
filter(route == "waterbourne", dosage_unit_consistent == "ug/L", pesticide_investigated == "glyphosate") %>%
# Rename the dosage type column for better labeling in the plot
mutate(dosage_type = if_else(dosage_type == "dosage_lowest", "Lowest Dosage Exposed", "Highest Dosage Exposed"))
# Create the plot with dosage type (i.e., lowest or highest dose) on the x-axis and dosage value on the y-axis
figs6 <- ggplot(pdo_waterbourne_glyphosate, aes(x = dosage_type, y = log(dosage_value))) +
# Add a violin plot
geom_violin(fill = "#5F85AE", alpha = 0.3, trim = FALSE, color = NA) +
# Add a boxplot
geom_boxplot(width = 0.05, fill = "white", color = "#5F85AE", outlier.shape = NA) +
# Add jittered points
geom_jitter(width = 0.1, height = 0.05, color = "#5F85AE", alpha = 0.5) +
# Add axis and plot labels
labs(title = "Waterborne Exposures of Glyphosate by Dosage in ug/L", x = "Waterbourne exposure", y = "log(Dosage) [ug/L]") +
# Customize plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank())
figs6 # ggsave(here("figures", "figs6_pesticide_dosage_glyphosate.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs6_pesticide_dosage_glyphosate.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s7 – Distribution of dosages used to expose zebrafish to chlorpyrifos via the waterborne exposure method
# Pivot the data set to a longer format, separating out the dosage type (lowest or highest) and value into separate columns
pdo_waterbourne_chloropyrifo <- pdo %>%
pivot_longer(cols = c(dosage_lowest, dosage_highest),
names_to = "dosage_type",
values_to = "dosage_value") %>%
# Filter for waterborne routes with consistent dosage units and only glyphosate pesticide investigated
filter(route == "waterbourne", dosage_unit_consistent == "ug/L", pesticide_investigated == "chloropyrifo") %>%
# Rename the dosage type column for better labeling in the plot
mutate(dosage_type = if_else(dosage_type == "dosage_lowest", "Lowest Dosage Exposed", "Highest Dosage Exposed"))
# Create the plot with dosage type (i.e., lowest or highest dose) on the x-axis and dosage value on the y-axis
figs7 <- ggplot(pdo_waterbourne_chloropyrifo, aes(x = dosage_type, y = log(dosage_value))) +
# Add a violin plot
geom_violin(fill = "#5F85AE", alpha = 0.3, trim = FALSE, color = NA) +
# Add a boxplot
geom_boxplot(width = 0.05, fill = "white", color = "#5F85AE", outlier.shape = NA) +
# Add jittered points
geom_jitter(width = 0.1, height = 0.05, color = "#5F85AE", alpha = 0.5) +
# Add axis and plot labels
labs(title = "Waterborne Exposures of Chloropyrifos by Dosage in ug/L", x = "Waterbourne exposure", y = "log(Dosage) [ug/L]") +
# Customize plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank())
figs7 # ggsave(here("figures", "figs7_pesticide_dosage_chloropyrifo.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs7_pesticide_dosage_chloropyrifo.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure 5b – Plot showing the distribuion of durations of pesticide exposure used in each study (filtered for waterborne exposure)
pdo_duration <- pdo %>%
filter(!is.na(duration), duration != "not reported") %>%
# Convert duration to numeric and duration_unit to character
mutate(duration = as.numeric(duration),
duration_unit = as.character(duration_unit),
# Standardize duration_unit_consistent based on dosage_unit
duration_unit_consistent = case_when(
duration_unit == "minutes" ~ "hours",
duration_unit == "days" ~ "hours",
duration_unit == "weeks" ~ "hours",
TRUE ~ duration_unit),
# Convert duration to hours based on duration_unit
duration_convert = case_when(
duration_unit == "minutes" ~ duration* 60,
duration_unit == "days" ~ duration/24,
duration_unit == "weeks" ~ duration/168,
TRUE ~ duration)) %>%
filter(route == "waterbourne")
fig5b <- ggplot(pdo_duration, aes(x = route , y = log(duration))) +
# Add a violin plot
geom_violin(fill = "#5F85AE", alpha =0.2, color = NA, trim = FALSE) +
# Add a boxplot
geom_boxplot(width = 0.05, fill = "white", color = "#5F85AE", outlier.shape = NA) +
# Add jittered points
geom_jitter(width = 0.1, height = 0.05, color = "#5F85AE", alpha = 0.8) +
# Add axis and plot labels
labs(x = "Distribution of Duration ", y = "log(duration) [hours]") +
# Customize plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 15),
axis.text.y = element_blank(),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip()
fig5b# ggsave(here("figures", "fig5b_pesticide_duration_exposure.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig5b_pesticide_duration_exposure.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure 5c - Plot showing the percentages of studies using each exposure methodology (IP stands for intraperitoneal injection)
# Count the total occurrence of each route in the data set
total_route_count <- pdo %>%
count(route)
# Count the proportion and percentage of each route in the data set
route_pct <- pdo %>%
count(route) %>%
mutate(proportion = n/sum(total_route_count$n),
percentage = proportion*100)
# Create a bar chart with the percentage of pesticides by route of exposure on the x-axis and the routes of exposure on the y-axis
fig5c <- ggplot(route_pct, aes(x = reorder(route, percentage), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add absolute count to bars
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", fontface = "bold", size = 7) +
# Add percentage label to bars
geom_text(aes(label = paste0(round(percentage, 1), "%")), hjust = -0.2, vjust = 0.5, size = 7, fontface = "bold") +
# Customize the appearance of the plot
labs(x = "Route of Exposure", y = "Percentage") +
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 100)
fig5c # ggsave(here("figures", "fig5c_pesticide_route_count.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig5c_pesticide_route_count.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure 5 - Plot showing the distribution of sample sizes used in pesticide exposure studies per group (if multiple exposure groups we calculated mean sample size per study).
count <- sum(sd$sample_size == "not reported", na.rm = TRUE)
# Print the count
print(count)## [1] 11
# Remove rows where sample_size is not reported
sd1 <- sd[sd$sample_size != "not reported", ]
# Convert sample_size column to numeric
sd1$sample_size <- as.numeric(sd1$sample_size)
fig5d <- ggplot(sd1, aes(x = 1, y = sample_size)) +
# Add a violin plot
geom_violin(fill = "#5F85AE", alpha =0.2, color = NA, trim = FALSE) +
# Add a boxplot
geom_boxplot(width = 0.05, fill = "white", color = "#5F85AE", outlier.shape = NA) +
# Add jittered points
geom_jitter(width = 0.1, height = 0.05, color = "#5F85AE", alpha = 0.8) +
labs(x ="Distribution of Sample Size", y = "Sample Size") +
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
scale_x_continuous(breaks = NULL, labels = NULL) +
coord_flip()
fig5d # ggsave(here("figures", "fig5d_sample_sizes.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig5d_sample_sizes.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
mean(sd1$sample_size)## [1] 16.10972
sd(sd1$sample_size)## [1] 14.0275
Figure 5 - Plots showing a) distributions of highest and lowest concentrations of pesticide used in each study, b) the distribution of durations of pesticide exposure used in each study , c) the percentages of studies using each exposure methodology (IP stands for intraperitoneal injection) and, d) the distribution of sample sizes used in pesticide exposure studies per group (if multiple exposure groups we calculated mean sample size per study).
# Combine three plots into a single plot using a grid layout
fig5 <- ((fig5a | fig5b) / (fig5c | fig5d) + plot_annotation(tag_levels = "A"))
fig5 # ggsave(here("figures", "fig5_pesticide_characteristics.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig5_pesticide_characteristics.jpg"), width = 22, height = 12, units = "cm", scale = 2, dpi = 800)Objective 3. To identify the specific behaviours that have been investigated in pesticide exposure experiments that use zebrafish as a model.
Figure 6 - Percentages of included papers on the effects of pesticides on zebrafish behaviour across behavioural classes assessed.
# Calculate total count for each category
total_behaviour_class_count <- bd %>%
separate_rows(behavioural_class, sep = ",\\s*") %>%
count(behavioural_class)
# Calculate proportion and percentage for each category
behav_class_pct <- total_behaviour_class_count %>%
mutate(proportion = n/sum(total_behaviour_class_count$n),
percentage = proportion*100)
# Create a bar chart with the count on the x-axis and behavioural class assay on the y-axis
fig6<- ggplot(behav_class_pct, aes(x = reorder(behavioural_class, percentage), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars for percentage
geom_text(aes(label = paste0(round(percentage, 1), "%")), hjust = -0.2, vjust = 0.5, size = 7, fontface = "bold", color = "black") +
# Add labels to the bars for absolute count
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", size = 7, hjust = 0.5, fontface = "bold") +
# Add axis and plot labels
labs(x = "Behavioural Class", y = "Percentage") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 50)
fig6# ggsave(here("figures", "fig6_behaviour_class_count.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "fig6_behaviour_class_count.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s8 – Percentages of included papers according to evaluated behaviours that were under the locomotion/activity category. Raw count is provided within each bar.
# Calculate count for each assay in behavioral activity
total_behaviour_activity_count <- bd %>%
separate_rows(behaviour_activity, sep = ",\\s*") %>%
count(behaviour_activity) %>%
na.omit()
# Calculate proportion and percentage for each category
behav_activity_pct <- total_behaviour_activity_count %>%
mutate(proportion = n/sum(total_behaviour_activity_count$n),
percentage = proportion*100)
# Create a bar chart with the count on the x-axis and behavioural activity assay on the y-axis
figs8 <- ggplot(behav_activity_pct, aes(x = reorder(behaviour_activity, n), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars for percentage
geom_text(aes(label = paste0(round(percentage, 1), "%")), hjust = -0.2, vjust = 0.5, size = 7, fontface = "bold", color = "black") +
# Add labels to the bars for absolute count
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", size = 7, hjust = 0.5, fontface = "bold") +
# Add axis and plot labels
labs(x = "Activity Assay", y = "Percentage") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 100)
figs8 # ggsave(here("figures", "figs8_behaviour_activity.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs8_behaviour_activity.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s9 – Percentages of included papers according to evaluated behaviours that were under the aggression category. Raw count is provided within each bar.
# Calculate count for each assay in aggression behavior
total_behaviour_aggression_count <- bd %>%
separate_rows(behaviour_aggression, sep = ",\\s*") %>%
count(behaviour_aggression) %>%
na.omit()
# Calculate proportion and percentage for each category
behav_aggression_pct <- total_behaviour_aggression_count %>%
mutate(proportion = n/sum(total_behaviour_aggression_count$n),
percentage = proportion*100)
# Create a bar chart with the count on the x-axis and aggression behaviour assay on the y-axis
figs9 <- ggplot(behav_aggression_pct, aes(x = reorder(behaviour_aggression, n), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars for percentage
geom_text(aes(label = paste0(round(percentage, 1), "%")), hjust = -0.2, vjust = 0.5, size = 7, fontface = "bold", color = "black") +
# Add labels to the bars for absolute count
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", size = 7, hjust = 0.5, fontface = "bold") +
# Add axis and plot labels
labs(x = "Aggression Behavior Assay", y = "Percentage") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20 , hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 120) +
scale_x_discrete(labels = c("Aggression with conspecific\nvideo or mirror of self"))
figs9 # ggsave(here("figures", "figs9_behaviour_aggression.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs9_behaviour_aggression.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s11 – Percentages of included papers according to evaluated behaviours that were under the foraging category. Raw count is provided within each bar.
# Calculate count for each assay in foraging behavior
total_behaviour_foraging_count <- bd %>%
separate_rows(behaviour_foraging, sep = ",\\s*") %>%
count(behaviour_foraging) %>%
na.omit()
# Calculate proportion and percentage for each category
behav_foraging_pct <- total_behaviour_foraging_count %>%
mutate(proportion = n/sum(total_behaviour_foraging_count$n),
percentage = proportion*100)
# Create a bar chart with the count on the x-axis and foraging behaviour assay on the y-axis
figs11 <- ggplot(behav_foraging_pct, aes(x = reorder(behaviour_foraging, n), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars for percentage
geom_text(aes(label = paste0(round(percentage, 1), "%")), hjust = -0.2, vjust = 0.5, size = 7, fontface = "bold", color = "black") +
# Add labels to the bars for absolute count
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", size = 7, hjust = 0.5, fontface = "bold") +
# Add axis and plot labels
labs(x = "Foraging Behavior Assay", y = "Percentage") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 100) +
scale_x_discrete(labels = c("Locomotor Activity\n within this context", "Olfactroy\npreference test", "Foraging on a live\nfood source", "Foraging on a not\n live food source"))
figs11 # ggsave(here("figures", "figs11_behaviour_foraging.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs11_behaviour_foraging.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s12 – Percentages of included papers according to evaluated behaviours that were under the antipredator category. Raw count is provided within each bar.
# Calculate count for each assay in antipredator behavior
total_behaviour_antipredator_count <- bd %>%
separate_rows(behaviour_antipredator, sep = ",\\s*") %>%
count(behaviour_antipredator) %>%
na.omit()
# Calculate proportion and percentage for each category
behav_antipredator_pct <- total_behaviour_antipredator_count %>%
mutate(proportion = n/sum(total_behaviour_antipredator_count$n),
percentage = proportion*100)
# Create a bar chart with the count on the x-axis and antipredator behaviour assay on the y-axis
figs12 <- ggplot(behav_antipredator_pct, aes(x = reorder(behaviour_antipredator, n), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars for percentage
geom_text(aes(label = paste0(round(percentage, 1), "%")), hjust = -0.2, vjust = 0.5, size = 7, fontface = "bold", color = "black") +
# Add labels to the bars for absolute count
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", size = 7, hjust = 0.5, fontface = "bold") +
# Add axis and plot labels
labs(x = "Antipredator Behavior Assay", y = "Percentage") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 100) +
scale_x_discrete(labels = c("Locomotor Activity\n within this context", "Response to a live predator\nbehind a barrier", "Response to a simulated\n predator"))
figs12 # ggsave(here("figures", "figs12_behaviour_antipredator.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs12_behaviour_antipredator.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s13 – Percentages of included papers according to evaluated behaviours that were under the anxiety/boldness category. Raw count is provided within each bar.
# Calculate count for each assay in anxiety behavior
total_behaviour_anxiety_count <- bd %>%
separate_rows(behaviour_anxiety, sep = ",\\s*") %>%
count(behaviour_anxiety) %>%
na.omit()
# Calculate proportion and percentage for each category
behav_anxiety_pct <- total_behaviour_anxiety_count %>%
mutate(proportion = n/sum(total_behaviour_anxiety_count$n),
percentage = proportion*100)
# Create a bar chart with the count on the x-axis and anxiety behavior assay on the y-axis
figs13 <- ggplot(behav_anxiety_pct, aes(x = reorder(behaviour_anxiety, n), y = percentage)) +
# Customize the appearance of the bars
geom_bar(stat = "identity", fill = "#5F85AE", color = "white", alpha = 0.8, position = position_dodge(0.9)) +
# Add labels to the bars for percentage
geom_text(aes(label = paste0(round(percentage, 1), "%")), hjust = -0.2, vjust = 0.5, size = 7, fontface = "bold", color = "black") +
# Add labels to the bars for absolute count
geom_text(aes(label = n), position = position_stack(vjust = 0.5), color = "white", size = 7, hjust = 0.5, fontface = "bold") +
# Add axis and plot labels
labs(x = "Anxiety Behavior Assay", y = "Percentage") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank()) +
coord_flip() +
ylim(0, 80) +
scale_x_discrete(labels = c("Lights on-off", "Shoaling", "Locomotor Activity\n within this context", "Habituation task", "Black-white area", "Novel tank or\n exploration"))
figs13 ggsave(here("figures", "figs13_behaviour_anxiety.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
ggsave(here("figures", "figs13_behaviour_anxiety.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s14 – Heat map plot showing counts of included papers according to combinations of evaluated behaviours and pesticide target class
# Join the behaviour details and pesticide details by "study_id"
bd_pd <- left_join(bd, pd, by = "study_id")
# Separate rows in "bd_pd" by "behavioural_class" and "pesticide_target_class" columns
bd_pd1 <- separate_rows(bd_pd, behavioural_class, sep = ",\\s*", convert = TRUE)
bd_pd1<- separate_rows(bd_pd1, pesticide_target_class, sep = ",\\s*", convert = TRUE)
# Group by "behavioural_class" and "pesticide_target_class" and summarize count
bd_pd_summary1 <- bd_pd1 %>%
mutate(behavioural_class = str_trim(behavioural_class),
pesticide_target_class = str_trim(pesticide_target_class)) %>%
group_by(behavioural_class, pesticide_target_class) %>%
summarise(count = n()) %>%
ungroup()
# Create a heatmap with pesticide target class on the x-axis and behavioural class on the y-axis
figs14 <- ggplot(bd_pd_summary1, aes(x = pesticide_target_class, y = behavioural_class, fill = count)) +
#Create and fill each tile
geom_tile(color = "white") +
scale_fill_gradient(low = "#F0F4F8", high = "#446487") +
# Add labels to the bars for absolute count
geom_text(aes(label = count), color = "black", size = 7) +
# Add axis and plot labels
labs(x = "Pesticide Target Class", y = "Behavioural Class", fill = "Count") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank(),
legend.text = element_text(size= 20),
legend.title = element_text(size = 20))
figs14 # ggsave(here("figures", "figs14_behaviour_target_class_heat_map.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs14_behaviour_target_class_heat_map.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)Figure s15 – Heat map plot showing counts of included papers according to combinations of evaluated behaviours and pesticide chemical class (filtered for top 5 most abundant chemical classes)
# Separate rows by behavioural_class and pesticide_chemical_class columns
bd_pd2 <- separate_rows(bd_pd, behavioural_class, sep = ",\\s*", convert = TRUE)
bd_pd2 <- separate_rows(bd_pd2, pesticide_chemical_class, sep = ",", convert = TRUE)
# Get the top 3 most numerous pesticide chemical classes
bd_pd_summary2 <- bd_pd2 %>%
mutate(behavioural_class = str_trim(behavioural_class),
pesticide_target_class = str_trim(pesticide_chemical_class)) %>%
group_by(behavioural_class, pesticide_chemical_class) %>%
summarise(count = n()) %>%
ungroup()
top_pesticide_classes <- bd_pd_summary2 %>%
filter(!is.na(pesticide_chemical_class)) %>%
group_by(pesticide_chemical_class) %>%
summarise(count = sum(count)) %>%
ungroup() %>%
top_n(5, count) %>%
pull(pesticide_chemical_class)
# Subset the data to include only the top 3 classes
bd_pd_summary_top5 <- bd_pd_summary2 %>%
filter(pesticide_chemical_class %in% top_pesticide_classes)
# Create a heatmap with pesticide chemical class on the x-axis and behavioral class on the y-axis
figs15 <- ggplot(bd_pd_summary_top5, aes(x = pesticide_chemical_class, y = behavioural_class, fill = count)) +
#Create and fill each tile
geom_tile(color = "white") +
scale_fill_gradient(low = "#F0F4F8", high = "#446487") +
# Add labels to the bars for absolute count
geom_text(aes(label = ifelse(count > 0, count, "")), color = "black", size = 7) +
# Add axis and plot labels
labs(x = "Pesticide Chemical Class", y = "Behavioural Class", fill = "Count") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank(),
legend.text = element_text(size= 20),
legend.title = element_text(size = 20))
figs15# ggsave(here("figures", "figs15_behaviour_chemical_class_heat_map.pdf"), width = 21, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs15_behaviour_chemical_class_heat_map.jpg"), width = 21, height = 10, units = "cm", scale = 2, dpi = 800)Figure s16 – Heat map plot showing counts of included papers according to combinations of evaluated life stages and pesticide chemical class (filtered for top 5 most abundant chemical classes)
# Join the stydt details with pesticide details by "study_id".
sd_pd <- left_join(sd, pd, by = "study_id")
# Separate rows in "sd_pd" by "life_stage_exposure" and "pesticide_chemical_class" columns
sd_pd1 <- separate_rows(sd_pd, life_stage_exposure, sep = ",", convert = TRUE)
sd_pd1 <- separate_rows(sd_pd1, pesticide_chemical_class, sep = ",", convert = TRUE)
# Group by "life_stage_exposure" and "pesticide_chemical_class" and summarize count
sd_pd_summary1 <- sd_pd1 %>%
mutate(life_stage_exposure = str_trim(life_stage_exposure),
pesticide_chemical_class = str_trim(pesticide_chemical_class)) %>%
group_by(life_stage_exposure, pesticide_chemical_class) %>%
summarise(count = n()) %>%
ungroup()
top_pesticide_classes <- sd_pd_summary1 %>%
filter(!is.na(pesticide_chemical_class)) %>%
group_by(pesticide_chemical_class) %>%
summarise(count = sum(count)) %>%
ungroup() %>%
top_n(4, count) %>%
pull(pesticide_chemical_class)
sd_pd_summary1_top5 <- sd_pd_summary1 %>%
filter(pesticide_chemical_class %in% top_pesticide_classes)
# Create a heatmap with pesticide target class on the x-axis and behavioural class on the y-axis
figs16 <- ggplot(sd_pd_summary1_top5, aes(x = pesticide_chemical_class, y = life_stage_exposure, fill = count)) +
#Create and fill each tile
geom_tile(color = "white") +
scale_fill_gradient(low = "#F0F4F8", high = "#446487") +
# Add labels to the bars for absolute count
geom_text(aes(label = ifelse(count > 0, count, "")), color = "black", size = 7) +
# Add axis and plot labels
labs(x = "Pesticide Chemical Class", y = "Life Stage Exposure", fill = "Count") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank(),
legend.text = element_text(size= 20),
legend.title = element_text(size = 20))
figs16 # ggsave(here("figures", "figs16_life_stage_chemical_class_heat_map.pdf"), width = 21, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs16_life_stage_chemical_class_heat_map.jpg"), width = 21, height = 10, units = "cm", scale = 2, dpi = 800)Figure s17 – Heat map plot showing counts of included papers according to combinations of evaluated life stages and pesticide target class
# Separate rows by life_stage_exposure and pesticide_target_class columns
sd_pd2 <- separate_rows(sd_pd, life_stage_exposure, sep = ",", convert = TRUE)
sd_pd2 <- separate_rows(sd_pd2, pesticide_target_class, sep = ",", convert = TRUE)
# Group by "life_stage_exposure" and "pesticide_target_class" and summarize count
sd_pd_summary2 <- sd_pd2 %>%
mutate(life_stage_exposure = str_trim(life_stage_exposure),
pesticide_target_class = str_trim(pesticide_target_class)) %>%
group_by(life_stage_exposure, pesticide_target_class) %>%
summarise(count = n()) %>%
ungroup()
# Create a heatmap with pesticide target class on the x-axis and life stage exposure on the y-axis
figs17 <- ggplot(sd_pd_summary2, aes(x = pesticide_target_class, y = life_stage_exposure, fill = count)) +
#Create and fill each tile
geom_tile(color = "white") +
scale_fill_gradient(low = "#F0F4F8", high = "#446487") +
# Add labels to the bars for absolute count
geom_text(aes(label = ifelse(count > 0, count, "")), color = "black", size = 7) +
# Add axis and plot labels
labs(x = "Pesticide Target Class", y = "Life Stage Exposure", fill = "Count") +
# Customize the plot theme
theme_minimal() +
theme(panel.grid.major.y = element_blank(),
axis.line.y = element_blank(),
axis.ticks.y = element_blank(),
axis.text.x = element_text(size = 20),
axis.text.y = element_text(size = 20, hjust = 1),
axis.title.x = element_text(size = 20),
axis.title.y = element_text(size = 20),
plot.title = element_blank(),
legend.text = element_text(size= 20),
legend.title = element_text(size = 20))
figs17 # ggsave(here("figures", "figs17_life_stage_target_class_heat_map.pdf"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)
# ggsave(here("figures", "figs17_life_stage_target_class_heat_map.jpg"), width = 16, height = 10, units = "cm", scale = 2, dpi = 800)